package com.atguigu.mybatisplus.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.atguigu.mybatisplus.constant.DateFormatContants;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

/**
 * 用户表
 */
@Getter
@Setter
@ToString
public class User {
    /**
     * 主键
     */
    private Long id;

    /**
     * 名称
     */
    private String name;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 创建时间
     */
    @JSONField(format = DateFormatContants.YYYY_MM_DD_HH_MM_SS)
    private Date createdDate;

    /**
     * 修改时间
     */
    @JSONField(format = DateFormatContants.YYYY_MM_DD_HH_MM_SS)
    private Date updatedDate;

    @TableLogic/*(delval = "2", value = "5")*/
    private Integer isDeleted;

    @Version
    private Integer version;
}